const cateModel = require("../models/cateModel.js")

class Cate {
    detail(id) {
        return cateModel.detail(id)
    }
    list() {
        return cateModel.list()
    }
    search(keyword) {
        return cateModel.search(keyword)
    }
    add(cate, cate_name, cate_url = "") {
        return cateModel.add(cate, cate_name, cate_url)
    }
    addBatch(parentCate, childCates) {
        return cateModel.addBatch(parentCate, childCates)
    }
    modify(cate, cate_name, cate_url, id) {
        return cateModel.modify(cate, cate_name, cate_url, id)
    }
    remove(id) {
        return cateModel.remove(id)
    }
    removeByParentCate(parentCate) {
        return cateModel.removeByParentCate(parentCate)
    }
    items(page_num, page_size) {
        return cateModel.items(page_num, page_size)
    }
}

module.exports = Cate